//package com.fuchuang.seckillsystem.rocketmq;
//
//import com.fuchuang.seckillsystem.entity.User;
//import com.fuchuang.seckillsystem.service.IUserService;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.annotation.SelectorType;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Component
//@RocketMQMessageListener(nameServer = "${rocketmq.name-server}", topic = "seckill",
//        consumerGroup = "user-group", selectorExpression = "user", selectorType = SelectorType.TAG)
//public class UserConsumer implements RocketMQListener<User> {
//
//    @Autowired
//    private IUserService userService;
//
//    @Override
//    public void onMessage(User user) {
//        log.info("收到注册用户信息{}", user);
//        userService.register(user);
//    }
//}